package com.study.quiz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.quiz.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author CJunGod
 * @create 2020-03-04 13:41
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user where token = #{token}")
    User findByToken(@Param("token") String token);

    @Select("select token from user  where  ACCOUNT_ID = #{accountId}")
    String findByAccountId(@Param("accountId") String accountId);

}
